package testes;

import java.io.IOException;
import java.io.InputStream;

public class Teste {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Process process = null;
		try {
			process = Runtime.getRuntime().exec("./Openfire");

			InputStream in = process.getInputStream();
			int c;
			String saida = "";

			while ((c = in.read()) != -1) {
				saida += ((char) c);
			}
			System.out.println("Mensagem recebida: " + saida);
			in.close();
		} catch (IOException e) {
			System.out.println(e.getMessage());
			System.out.println(e.getCause());
		}
	}

}
